{include file="../view/head" /}
<style>
    /*页面自定义样式*/
    .title h5,
    .titleb i {
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        word-wrap: break-word;
        word-break: break-all;
        white-space: normal !important;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .panel-heading>form {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-right: 40px;
    }

    .panel-heading>form>div>label {
        width: 100%;
        background: #666;
        color: #fff;
        border-radius: 4px 4px 0 0;
        border: 1px solid #666;
        margin: 0;
        text-align: center;
    }

    .panel-heading>form>div>.form-control {
        border-radius: 0 0 4px 4px;
        border: 1px solid #666;
        padding: 0;
        height: auto;
    }

    td>.btn {
        font-weight: normal;
    }
</style>
</head>

<body>
    {include file="../view/header" /}
    {include file="../view/sidebar" /}
    {include file="../view/right-sidebar" /}
    <!-- Start #content -->
    <div id="content">
        <!-- Start .content-wrapper -->
        <div class="content-wrapper">
            <div class="row">
                <!-- Start .row -->
                <!-- Start .page-header -->
                <div class="col-lg-12 heading hidden-xs hidden-sm">
                    <!-- Start .bredcrumb -->
                    <ul id="crumb" class="breadcrumb"></ul>
                    <!-- End .breadcrumb -->
                </div>
                <!-- End .page-header -->
            </div>
            <!-- End .row -->
            <div class="outlet">
                <!-- Start .outlet -->
                <!-- Page start here ( usual with .row ) -->
                <div class="row">
                    <div class="col-md-12">
                        <!-- col-lg-12 start here -->
                        <div class="panel panel-default toggle panelRefresh">


                            <div class="panel-heading" style="padding: 10px 15px;">

                                <form action="{:url('users/give')}" method="post" style="width: 400px">
                                    {:token()}
                                    <div style="width:125px;">
                                        <label>用户</label>
                                        <input type="text" name="project_mobile" min="0" class="form-control"
                                            placeholder="请输入用户名">
                                    </div>
                                    <button type="submit" class="btn btn-primary">搜索</button>
                                </form>
                            </div>
                            <div class="panel-heading" style="padding: 10px 15px;">
                                <form action="{:url('users/give_kj')}" method="post" style="width: 400px">
                                    {:token()}
                                    <div style="width:125px;">
                                        <label>用户</label>
                                        <input type="text" name="uname" min="0" class="form-control"
                                            placeholder="请输入用户名">
                                    </div>
                                    <div style="width:125px;">
                                        <label>矿机</label>
                                        <select name="project" class="form-control">
                                            <option value="">请选择赠送矿机</option>
                                            {volist name="project" id="v"}
                                            <option value="{$v.id}">{$v.name}</option>
                                            {/volist}
                                        </select>
                                    </div>
                                    <button type="submit" class="btn btn-primary">赠送矿机</button>
                                </form>
                            </div>


                            

                      
                            <!-- Start .panel -->
                            <div class="panel-body">
                                <table class="table table-bordered table-hover table-striped">
                                    <thead>
                                        <tr>
                                            <th>赠送用户</th>
                                            <th>类型</th>
                                            <th>赠送时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {foreach $give_project as $list}
                                        <tr>
                                            <td>{$list.mobile}</td>
                                            <td>{$list.project}</td>
                                            <td>{$list.addtime|date="Y-m-d H:i:s",###}</td>
                                            <td>
                                                {if condition="$list.zt neq 3"}
                                                <a class="mt5 btn btn-xs btn-primary" onClick="return confirm('确定扣回矿机?');" href="{:url('project/del_order',['id'=>$list.id])}/zt/0">扣回</a>
                                                {/if}
                                            </td>
                                        </tr>
                                        {/foreach}
                                    </tbody>
                                </table>
                                <div class="row">
                                    <div class="col-md-6">
                                        {$give_project->render()}
                                    </div>
                                    <div class="col-md-6">
                                        <p>总数：{$give_project->total()}</p>
                                    </div>
                                </div>
                            </div>


                        </div>
                    </div>
                </div>

                 <!-- Page start here ( usual with .row ) -->
                 <div class="row">
                    <div class="col-md-12">
                        <!-- col-lg-12 start here -->
                        <div class="panel panel-default toggle panelRefresh">

                            <div class="panel-heading" style="padding: 10px 15px;">

                                <form action="{:url('users/give')}" method="post" style="width: 400px">
                                    {:token()}
                                    <div style="width:125px;">
                                        <label>用户</label>
                                        <input type="text" name="logocoin_uname" min="0" class="form-control"
                                            placeholder="请输入用户名">
                                    </div>
                                    <button type="submit" class="btn btn-primary">搜索</button>
                                </form>
                            </div>

                            <div class="panel-heading" style="padding: 10px 15px;">
                                <form action="{:url('users/give_b')}" method="post" style="width: 400px">
                                    {:token()}
                                    <div style="width:125px;">
                                        <label>用户</label>
                                        <input type="text" name="uname" min="0" class="form-control"
                                            placeholder="请输入用户名">
                                    </div>
                                    <div style="width:125px;">
                                        <label>IDC币</label>
                                        <input type="number" name="idc"  class="form-control"
                                            placeholder="请输入赠送数量">
                                    </div>
                                    <button type="submit" class="btn btn-primary">赠送IDC币</button>
                                </form>
                            </div>

                            <!-- Start .panel -->
                            <div class="panel-body">
                                <table class="table table-bordered table-hover table-striped">
                                    <thead>
                                        <tr>
                                            <th>赠送用户</th>
                                            <th>赠送数量</th>
                                            <th>赠送时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {foreach $give_logocoin as $list}
                                        <tr>
                                            <td>{$list.uname}</td>
                                            <td>{$list.money}</td>
                                            <td>{$list.time|date="Y-m-d H:i:s",###}</td>
                                        </tr>
                                        {/foreach}
                                    </tbody>
                                </table>
                                <div class="row">
                                    <div class="col-md-6">
                                        {$give_logocoin->render()}
                                    </div>
                                    <div class="col-md-6">
                                        <p>总数：{$give_logocoin->total()}</p>
                                    </div>
                                </div>
                            </div>


                        </div>
                    </div>
                </div>
                <!-- Page End here -->
            </div>
            <!-- End .outlet -->
        </div>
        <!-- End .content-wrapper -->
        <div class="clearfix"></div>
    </div>
    <!-- End #content -->
    {include file="../view/foot" /}
    <script>

    </script>
</body>

</html>